[Top] [Prev] [Next] [Bottom] [Contents]

SaMsgErrHandler

Definition for error handler functions.

Synopsis

#include "WorkingDialog.h"
typedef void (*SaMsgErrHandler) (int, int, int, char *, int, 
int);
	int type;
	int major;
	int minor;
	char *message;
	int aux1;
	int aux2;

Inputs

type
SGESYBASE, SGEORACLE, SGEINFORMIX, DBUIMX or OPSYS
major
major code, generally the error code from the RDBMS vendor.
minor
minor code, meaning varies
message
the message string associated with the error.
aux1
auxiliary value
aux2
auxiliary value, generally contains offset to where the error occurred in the SQL statement that caused the error.

Return Values

None.

Description

SaMsgErrHandler is registered by SaSetMsgErrHandler(SaMsgErrHandler).

The data that your Error Handler function is called with depends upon the type of message. This is what gets passed to an error handler function when an error occurs. The message called from your Error Handler depends upon the error and/or data.

Error Type 1: Sybase
Argument Description
type SGESYBASE or OPSYS
major message number
minor severity
message message text
aux1 message state for Server Messages, 0 for DB-Library or Operating System errors.
aux2 the line error occurred on for Server Messages, 0 for DB-Library or Operating System errors.

Argument Description
type SGEORACLE
major Error Code
minor 0
message message text
aux1 0
aux2 offset into the SQL statement where the error occurred.
Error Type 2: Oracle

Argument Description
type SGEINFORMIX
major Error Code
minor -1
message message text
aux1 -1
aux2 offset into the SQL statement where the error occurred.
Error Type 3: Informix

Argument Description
type SGESYBASE, SGEORACLE, or SGEINFORMIX
major 0
minor 0
message vendor Login Failed.
aux1 0
aux2 0
Error Type 4: Login Failure (Sybase, Oracle and Informix)

See Also



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.